import '../common/lib';
import App from '../component/App';
import React from 'react';
import ReactDOM from 'react-dom';
import {Router, hashHistory } from 'react-router';
// 不使用queryKey
// import { Router,useRouterHistory } from 'react-router'
// import { createHistory } from 'history'
// var appHistory = useRouterHistory(createHistory)({queryKey:false})

const rootRoute = {
  childRoutes: [{
    path: '/',
    component: App,
    indexRoute: { onEnter: (nextState, replace) => replace('/hello')},
    childRoutes: [
      require('../route/Hello'),
      require('../route/World')
    ]
  }]
};


ReactDOM.render(
  <Router history={hashHistory} routes={rootRoute} />,
  document.getElementById('app'));
